<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Feedback library class
 *
 * Feedback information's CRUD.
 *
 */
class Feedback_lib
{
	/**
	 * Constructor
	 *
	 * Load all feedback model.
	 */
	public function __construct()
	{
		$this->CI = &get_instance();

		$this->CI->load->model('pf/feedback/feedback_model');
	}
	
	/**
	 * Add feedback
	 *
	 * @param	object	feedback information
	 * @return	boolean
	 */
	public function add_new($data)
	{
		if(empty($data))
			return false;
		
// 		$fb['app_id'] = $data['app_id'];
// 		$fb['user_id'] = $data['user_id'];
// 		$fb['content'] = $data['content'];
// 		$fb['pic'] = $data['pic'];
// 		$fb['os'] = $data['os'];
// 		$fb['pic'] = $data['pic'];
// 		$fb['time'] = time();
		$data['time'] = time();
		$this->CI->feedback_model->add($data);
		
		return true;
	}
}